import Vue from 'vue'
import App from './App.vue'
import router from '@/router/index.js'
import Vueparticles from 'vue-particles'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.config.productionTip = false
Vue.use(Vueparticles)
Vue.use(ElementUI)
import '@/assets/fonts/icomoon.css'
import '@/assets/commonstyle/common.css'
import Toast from './components/Toast';
import VueRouter from 'vue-router'
import store from '@/store/index'
import pagination from '@/components/Mypagination/index'
//重写push和replace方法解决duplication问题
const routerPush = VueRouter.prototype.push;
VueRouter.prototype.push = function(location) {
  return routerPush.call(this, location,()=>{},()=>{})
}
const routerReplace = VueRouter.prototype.Replace;
VueRouter.prototype.replace = function(location) {
  return routerReplace.call(this, location,()=>{},()=>{})
}
Vue.prototype.$Toast= Toast;
//注册分页器为全局组件
Vue.component('pagination',pagination);
new Vue({
  render: h => h(App),
  router,
  store
}).$mount('#app')
